import request from '@/utils/request'

// 查询代理商用户列表
export function listAgent_user(query) {
  return request({
    url: '/agent/agent_user/list',
    method: 'get',
    params: query
  })
}

// 查询代理商用户详细
export function getAgent_user(remark) {
  return request({
    url: '/agent/agent_user/' + remark,
    method: 'get'
  })
}

// 新增代理商用户
export function addAgent_user(data) {
  return request({
    url: '/agent/agent_user',
    method: 'post',
    data: data
  })
}

// 修改代理商用户
export function updateAgent_user(data) {
  return request({
    url: '/agent/agent_user',
    method: 'put',
    data: data
  })
}

// 删除代理商用户
export function delAgent_user(remark) {
  return request({
    url: '/agent/agent_user/' + remark,
    method: 'delete'
  })
}

// 导出代理商用户
export function exportAgent_user(query) {
  return request({
    url: '/agent/agent_user/export',
    method: 'get',
    params: query
  })
}
//初始密码
export function resetAgentPwd(agentId,password) {
  let data = {
    agentId,
    password
  }
  return request({
    url: '/agent/agent_user/resetAgentPwd',
    method: 'put',
    data: data
  })
}
